package string;

public class ReplaceAllDemo {
    public static void main(String[] args) {
        String str="adn213243dasd64432ads";
        str=str.replaceAll("[a-z]+","NUMMER");
        System.out.println(str);

        String regex="(我去年买了个表|大傻逼|脑残|TMD|NC)";
        String message="我去年买了个表，TMD，你这个大傻逼，脑残吧，你NC吧！";
        message=message.replaceAll(regex,"***");
        System.out.println(message);     
    }
}
